package com.wnx.util;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	private static Configuration cfg = null;
	private static SessionFactory factory = null;
	static { 
		cfg = new Configuration(); 
		cfg.configure(); 
		factory = cfg.buildSessionFactory(); 
		}
	
	public static Session getSession(){ 
		return factory.openSession(); 
	
	}
}

